package com.example.zbh.dsliao.presenter;

import android.util.Log;

import com.example.zbh.dsliao.model.ContactModel;
import com.example.zbh.dsliao.model.entity.ContactPeople;
import com.example.zbh.dsliao.model.modelinterface.ModelContactInterface;
import com.example.zbh.dsliao.presenter.presenterinterface.PresenterContactInterface;
import com.example.zbh.dsliao.ui.viewinterface.ViewContactInterface;

import java.util.List;

/**
 * Created by zbh on 15/11/20.
 */
public class ContactListPresenter extends BasePresenter<ViewContactInterface> implements PresenterContactInterface {
    private ViewContactInterface viewContactInterface;
    private ModelContactInterface modelContactInterface;
    public ContactListPresenter(ViewContactInterface viewContactInterface) {
        this.viewContactInterface = viewContactInterface;
        modelContactInterface = new ContactModel();

    }

    public void startGetContact(){
        Log.i("nan", 2 + "");
        modelContactInterface.recevieveContact( this);

    }


    @Override
    public void sendReciveResult(List<ContactPeople> list) {
        Log.i("nan",4 + "");
        viewContactInterface.showContactList(list);

    }
}
